﻿using System;
using System.Web;
using System.Web.Mvc;

namespace com.hyrentals.webportal.Controllers
{
    [ValidateInput(false)]
    public class BaseController : Controller
    {
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            base.OnActionExecuting(filterContext);

            string controller = (string)filterContext.RouteData.Values["controller"];
            if (controller.ToLower() != "account")
            {
                ViewBag.ReturnUrl = HttpUtility.UrlEncode(Request.Url.PathAndQuery);
            }
        }
    }
}